package ua.yandex.skipasssystem;

import ua.yandex.skipasssystem.skipass.SkiPass;

import java.time.LocalDateTime;

public class Turnstile {
    private SkiPassSystemInterface skiPassSystemInterface;

    public Turnstile(SkiPassSystemInterface skiPassSystemInterface) {
        this.skiPassSystemInterface = skiPassSystemInterface;
    }

    public boolean trySkiPass(SkiPass skiPass,
                              LocalDateTime dateTime) {
        return skiPassSystemInterface.validateSkiPass(skiPass, dateTime);
    }
}
